﻿using System;

class GreatestFromFive
{
    static void Main()
    {
        //Exercise 7.
        //Write a program that finds the greatest of given 5 variables.

        double greatest = 0;

        for (int i = 0; i < 5; i++)
        {
            Console.Write("Enter a number:  ");
            double number = double.Parse(Console.ReadLine());

            if (number > greatest)
            {
                greatest = number;                
            }
            else
            {
                continue;
            }
        }
        Console.WriteLine();
        Console.WriteLine("The greatest number is: {0}.", greatest);
        Console.WriteLine();
    }
}

